package com.study.modules.saas.repository.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.study.modules.saas.repository.enums.UserStatus;
import com.study.modules.saas.repository.enums.UserType;
import lombok.Data;

import java.util.Date;

@Data
@TableName("`user`")
public class UserDO {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private String uuid;

    @TableField("username")
    private String userName;

    @TableField("password")
    private String passWord;

    @TableField(value = "created_by")
    private String createdBy;

    @TableField(value = "created_at")
    private Date createdAt;

    @TableField(value = "updated_by")
    private String updatedBy;

    @TableField(value = "updated_at")
    private Date updatedAt;

    @TableField(value = "deleted_by")
    private String deletedBy;

    @TableField(value = "deleted_at")
    private Date deletedAt;

    @TableField(value = "last_login_time")
    private Date lastLoginTime;

    private UserStatus status;

    private UserType type;

    @TableField(exist = false)
    private RoleDO roleDO;
}
